package com.bishe.demo.modules.hotel.hotelPolicy.dao;

import com.bishe.demo.modules.hotel.hotelPolicy.entity.BreakfastBreakfastType;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;
import org.springframework.stereotype.Repository;

@Mapper
@Repository
public interface BreakfastBreakfastTypeDao {
    @Insert("insert into hotel_breakfast_breakfast_type values(null,#{breakfastId},#{breakfastTypeId})")
    @Options(useGeneratedKeys = true, keyProperty = "id", keyColumn = "id")
    void insertBreakfastBreakfastType(BreakfastBreakfastType breakfastBreakfastType);

    @Delete("delete from hotel_breakfast_breakfast_type where breakfast_id=#{breakfastId}")
    void deleteByBreakfastId(int breakfastId);
}
